package top.jiangqiang.qianyi.common.constants.base;

import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import top.jiangqiang.qianyi.common.utils.JsonUtil;

@Data
public class EnumItem {
    //不返回给前端
    @JsonIgnore
    private Enum<?> enumObj;
    //枚举名字
    @JsonIgnore
    private String name;

    @Schema(description = "枚举编码")
    private String code;

    @Schema(description = "枚举描述")
    private String desc;

    @Override
    public String toString() {
        return JsonUtil.toJsonStr(this);
    }
}